var express = require('express');  
var router = express.Router();  

var ups=require('../controll/upload');

//增 
router.post('/profile',function(req, res, next) { 
  ups.create(req,res,next);
}); 

//查
router.post('/list/:type', function(req, res, next) {
  ups.list(req,res,next);
});

//改
router.put('/data/:id', function(req, res, next) {
  ups.update(req,res,next);
});

//删
router.delete('/data/:id', function(req, res, next) {
  ups.delete(req,res,next);
});

//删除多个
router.post('/manydata/delete', function(req, res, next) {
  ups.deletemany(req,res,next);
});

//打开文件
router.post('/file',function(req, res, next) {
  ups.getFile(req,res,next);
})

  
module.exports = router; 


